::WS::Utils::ServiceTypeDef Client FreshBookApi ClientLinks {
    client_view {type string minOccurs 1 maxOccurs 1}
    view {type string minOccurs 1 maxOccurs 1}
    sstatement {type string minOccurs 1 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi ClientDefinition {
    first_name {type string minOccurs 1 maxOccurs 1}
    last_name {type string minOccurs 1 maxOccurs 1}
    organization {type string minOccurs 1 maxOccurs 1}
    email {type string minOccurs 1 maxOccurs 1}
    username {type string minOccurs 0 maxOccurs 1}
    password {type string minOccurs 0 maxOccurs 1}
    work_phone {type string minOccurs 0 maxOccurs 1}
    home_phone {type string minOccurs 0 maxOccurs 1}
    mobile {type string minOccurs 0 maxOccurs 1}
    fax {type string minOccurs 0 maxOccurs 1}
    language {type string minOccurs 0 maxOccurs 1}
    currency_code {type string minOccurs 0 maxOccurs 1}
    notes {type string minOccurs 0 maxOccurs 1}
    p_street1 {type string minOccurs 1 maxOccurs 1}
    p_street2 {type string minOccurs 0 maxOccurs 1}
    p_city {type string minOccurs 0 maxOccurs 1}
    p_state {type string minOccurs 0 maxOccurs 1}
    p_country {type string minOccurs 0 maxOccurs 1}
    p_code {type string minOccurs 0 maxOccurs 1}
    s_street1 {type string minOccurs 0 maxOccurs 1}
    s_street2 {type string minOccurs 0 maxOccurs 1}
    s_city {type string minOccurs 0 maxOccurs 1}
    s_state {type string minOccurs 0 maxOccurs 1}
    s_country {type string minOccurs 0 maxOccurs 1}
    s_code {type string minOccurs 0 maxOccurs 1}
    vat_name {type string minOccurs 0 maxOccurs 1}
    vat_number {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi ClientCredits {
    credit {type float minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi ClientDetails {
    client_id {type string minOccurs 1 maxOccurs 1}
    first_name {type string minOccurs 0 maxOccurs 1}
    last_name {type string minOccurs 0 maxOccurs 1}
    organization {type string minOccurs 0 maxOccurs 1}
    email {type string minOccurs 0 maxOccurs 1}
    username {type string minOccurs 0 maxOccurs 1}
    work_phone {type string minOccurs 0 maxOccurs 1}
    home_phone {type string minOccurs 0 maxOccurs 1}
    mobile {type string minOccurs 0 maxOccurs 1}
    fax {type string minOccurs 0 maxOccurs 1}
    language {type string minOccurs 0 maxOccurs 1}
    currency_code {type string minOccurs 0 maxOccurs 1}
    credits {type ClientCredits()}
    notes {type string minOccurs 0 maxOccurs 1}
    p_street1 {type string minOccurs 1 maxOccurs 1}
    p_street2 {type string minOccurs 0 maxOccurs 1}
    p_city {type string minOccurs 0 maxOccurs 1}
    p_state {type string minOccurs 0 maxOccurs 1}
    p_country {type string minOccurs 0 maxOccurs 1}
    p_code {type string minOccurs 0 maxOccurs 1}
    s_street1 {type string minOccurs 0 maxOccurs 1}
    s_street2 {type string minOccurs 0 maxOccurs 1}
    s_city {type string minOccurs 0 maxOccurs 1}
    s_state {type string minOccurs 0 maxOccurs 1}
    s_country {type string minOccurs 0 maxOccurs 1}
    s_code {type string minOccurs 0 maxOccurs 1}
    links {type ClientLinks()}
    vat_name {type string minOccurs 0 maxOccurs 1}
    vat_number {type string minOccurs 0 maxOccurs 1}
    folder {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi ClientDetailArray {
    client  {type ClientDetails()}
}


::WS::Client::DefineRestMethod FreshBookApi client client.create {
    client    {type ClientDefinition}
} {
    client_id {type string}
}

::WS::Client::DefineRestMethod FreshBookApi client client.update {
    Client    {type ClientDefinition}
} {}

::WS::Client::DefineRestMethod FreshBookApi client client.get {
    client_id {type string}
} {
    client    {type ClientDetails}
}

::WS::Client::DefineRestMethod FreshBookApi client client.delete {
    client_id {type string}
} {}

::WS::Client::DefineRestMethod FreshBookApi client client.list {
    email {type string minOccurs 0 maxOccurs 1}
    username {type string minOccurs 0 maxOccurs 1}
    update_from {type date minOccurs 0 maxOccurs 1}
    update_to {type date minOccurs 0 maxOccurs 1}
    page {type string minOccurs 0 maxOccurs 1}
    per_page {type string minOccurs 0 maxOccurs 1 default 25}
    folder {type string minOccurs 0 maxOccurs 1}
    notes {type string minOccurs 0 maxOccurs 1}
} {
    clients    {type ClientDetailArray}
}
